﻿using System;
using Volo.Abp.Domain.Entities.Auditing;

namespace Joy.Erp.BasicArchives.Core
{
    public class ArchiveChildAggregateRoot<TKey> : AuditedAggregateRoot<TKey>, IArchiveChildAggregateRoot<TKey>
    {
        /// <summary>
        /// 设置id
        /// </summary>
        /// <param name="id"></param>
        public virtual void SetId(TKey id) => Id = id;

        /// <summary>
        /// 主档案
        /// </summary>
        public virtual Guid MainArchiveId { get; set; }

        /// <summary>
        /// 来源类型
        /// </summary>
        public virtual string SourceType { get; set; }

        /// <summary>
        /// 来源主键
        /// </summary>
        public virtual string SourceKey { get; set; }

        /// <summary>
        /// 来源时间
        /// </summary>
        public virtual DateTime? SourceCreatedOn { get; set; }
    }

    public class ArchiveChildAggregateRoot : ArchiveChildAggregateRoot<Guid>, IArchiveChildAggregateRoot
    {
    }
}
